#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <stdlib.h>
int cmp_int(const void* e1, const void* e2)
{
	return*(int*)e1 - *(int*)e2;
}
struct StuS
{
	char name[20];
	int age;
};
int cmp_stu_by_name(const void* e1, const void* e2)
{
	return strcmp((*(struct Stu*)e1).name, (*(struct Stu*)e2).name);
}
void test2()
{
	struct Stu s[3] = { {"aaa",18},{"bbb",25},{"ccc",12} };
	int sz = sizeof(s) / sizeof(s[0]);
	qsort(s, sz, sizeof(s[0], cmp_stu_by_name));
}
int main()
{
	test2();
	return 0;
}